<h1>Listing <%= @scaffold_plural_name %></h1>

<table>
  <tr>
  <% for column in @scaffold_class.content_columns %>
    <th><%= column.human_name %></th>
  <% end %>
  </tr>
  
<% for entry in instance_variable_get("@#{@scaffold_plural_name}") %>
  <tr>
  <% for column in @scaffold_class.content_columns %>
    <td><%= entry.send(column.name) %></td>
  <% end %>
    <td><%= link_to 'Show', @scaffold_model_path.call(entry) %></td>
    <td><%= link_to 'Edit', @scaffold_edit_model_path.call(entry) %></td>
    <td><%= link_to 'Destroy', @scaffold_model_path.call(entry), :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to "New #{@scaffold_singular_name}", @scaffold_new_model_path.call %>